angular.module("myApp")
.controller("DestinationController", ["$scope", "DestinationService", function($scope, DestinationService){
	DestinationService.getData().success(function(data){
		$scope.items = data.data;
		$scope.index = 0;
		//点击切换城市、国家
		$scope.click = function(index, e){
			$scope.index = index;
			$scope.city = document.getElementsByClassName("destination_continent_name_click")[0];
			if($scope.city != null){
				$scope.city.className = "destination_continent_name";
			}
			e.target.setAttribute("class", "destination_continent_name_click");
			$scope.city = e.target;
			$scope.city =function(){
				location.href = "views/destination/destinationCity/destinationCityStrategy/destinationCityStrategy.html";
			}
		}
		//城市点击
		$scope.city =function(){
			console.log(123);
			location.href = "views/destination/destinationCity/destinationCityStrategy/destinationCityStrategy.html";
		}
		//国家点击
		$scope.gocountry =function(){

			location.href = "views/destination/destinationCountry/destinationCountry.html";
			console.log(123);
		}
	})
}])



